<?php echo get_header(); ?>
<form action="" method="get" id="user_index">
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo __('语言管理');?></h3>

                        <div class="box-tools pull-right">
                            
                        </div>
                        <!-- /.box-tools -->
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body no-padding">
                        <div class="mailbox-controls">
                            <!-- Check all button -->
                            <button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
                            <div class="btn-group">
                                <button type="button" class="btn btn-danger btn-sm"><i class="fa fa-trash-o"></i></button>
                                <button type="button" class="btn btn-default btn-sm"><i class="fa fa-reply"></i></button>
                                <button type="button" class="btn btn-default btn-sm"><i class="fa fa-share"></i></button>
                            </div>
                            <!-- /.btn-group -->
                            <a href="<?php echo url_for('/system/language.php?action=add'); ?>" class="btn btn-success btn-sm"><i class="fa fa-plus"></i> 添加语言</a>
                            <div class="pull-right">
                                <?php echo get_default($paginator->getOffset(), 1); ?>-<?php echo $paginator->getLimit() + $paginator->getOffset(); ?>/<?php echo $total_rows; ?>
                                <div class="btn-group">
                                    <a href="<?php echo $paginator->getPrevLink(); ?>" class="btn btn-default btn-sm" ><i class="fa fa-chevron-left"></i></a>
                                    <a href="<?php echo $paginator->getNextLink(); ?>" class="btn btn-default btn-sm" ><i class="fa fa-chevron-right"></i></a>                                
                                </div>
                                <!-- /.btn-group -->
                            </div>
                            <!-- /.pull-right -->
                        </div>
                        <div class="table-responsive mailbox-messages">
                            <table class="table table-hover table-striped table-vertical-align">
                                <tr>
                                    <th></th>
                                    <th>语言名称</th>
                                    <th>Code</th>
                                    <th>Locale</th>
                                    <th>目录</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                <tbody>
                                    <?php foreach ($languages as $lang) { ?>
                                        <tr>
                                            <td><input type="checkbox" name="language[id]" value="<?php echo $lang->language_id; ?>"></td>
                                            <td><img src="<?php echo get_language_icon($lang->image); ?>"/> <?php echo $lang->name; ?></td>
                                            <td><?php echo $lang->code; ?></td>
                                            <td><?php echo $lang->locale; ?></td>
                                            <td><?php echo $lang->directory; ?></td>
                                            <td><?php echo status_span($lang->status); ?></td>
                                            <td>
                                            </td>
                                        </tr>
                                    <?php } ?>

                                </tbody>
                            </table>
                            <!-- /.table -->
                        </div>
                        <!-- /.mail-box-messages -->
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer no-padding">
                        <div class="mailbox-controls">
                            <!-- Check all button -->
                            <button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i>
                            </button>
                            <div class="btn-group">
                                <button type="button" class="btn btn-default btn-sm"><i class="fa fa-trash-o"></i></button>
                                <button type="button" class="btn btn-default btn-sm"><i class="fa fa-reply"></i></button>
                                <button type="button" class="btn btn-default btn-sm"><i class="fa fa-share"></i></button>
                            </div>
                            <!-- /.btn-group -->
                            <button type="button" class="btn btn-default btn-sm"><i class="fa fa-refresh"></i></button>
                            <div class="pull-right">
                                <?php echo $paginator->render(); ?>
                            </div>
                            <!-- /.pull-right -->
                        </div>
                    </div>
                </div>

            </div>
        </div>

    </section>
    <!-- /.content -->
</form>
<?php echo get_footer(); ?>
